package net.sky.oa.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * 投票选项表
 * TalVoteoptions. @author hond
 */
@Entity
@Table(name = "TAL_VOTEOPTIONS")//投票选项表
public class TalVoteoptions implements java.io.Serializable {

	private static final long serialVersionUID = 5673991033245515351L;
	
	// Fields

	protected Long id;
	private String name;//选项名
	private String mark;//选项标识
	private String desn;//选项描述
	private Integer status;//状态
	private Integer serial;//序号
	private TalVote vote;//

	// Constructors

	/** default constructor */
	public TalVoteoptions() {
	}
	
	@Id
    @Column(name = "ID", unique = true, nullable = false)
	@SequenceGenerator(name="SQ_TALVOTEOPTIONS_ID",sequenceName="SQ_TALVOTEOPTIONS_ID",allocationSize=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="SQ_TALVOTEOPTIONS_ID")
	public Long getId() {
        return id;
    }

    public void setId(Long id){
    	this.id = id;
    }
	
	/** minimal constructor */
	public TalVoteoptions(Long id) {
		this.id = id;
	}

	@Column(name = "NAME", length = 40)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "MARK", length = 15)
	public String getMark() {
		return this.mark;
	}

	public void setMark(String mark) {
		this.mark = mark;
	}

	@Column(name = "DESN", length = 100)
	public String getDesn() {
		return this.desn;
	}

	public void setDesn(String desn) {
		this.desn = desn;
	}

	@Column(name = "STATUS", precision = 2, scale = 0)
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}
	
	@Column(name = "SERIAL", precision = 2, scale = 0)
	public Integer getSerial() {
		return this.serial;
	}
	
	public void setSerial(Integer serial) {
		this.serial = serial;
	}
	
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "VOTE_ID")
	public TalVote getVote() {
		return this.vote;
	}

	public void setVote(TalVote vote) {
		this.vote = vote;
	}

}